package application;

import org.atovio.structure.application.FileCompress;

import java.io.*;

/**
 * @author AtoVio, Winter Yuan
 * @version 1.0
 */
public class FileCompressTest02 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        // 获取压缩对象
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("TestFile/object1"));
        FileCompress compress = (FileCompress) ois.readObject();
        ois.close();

        // 解压缩文件
        File origin = new File("TestFile/origin02.txt"); // 输出路径
        File compressed = new File("TestFile/compressed01.txt");
        compress.decode(origin, compressed);
    }
}
